package com.bjpowernode.service.impl;
import com.bjpowernode.dao.UserDao;
import com.bjpowernode.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserDao userDao;

    // 为配置文件提供set注入的要求
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public int addUser(String name,Integer age) {
        return userDao.addUser(name,age);
    }
}
